package com.service.impl;

import com.entity.Book;
import com.entity.Category;
import com.mapper.BookMapper;
import com.service.IBookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/3/13.
 */
@Service
public class BookServiceImpl implements IBookService {
    @Resource
    private BookMapper bookMapper;

    public List<Map> listCategory() {
        return bookMapper.getCategory();
    }

    public Map getMinCategory() {
        return bookMapper.getMinCategory();
    }

    public List<Category> getSubCategory(String subCategoryName) {
        return bookMapper.getSubCategory(subCategoryName);
    }

    public List<Book> getBookInfoBySubCategoryName(String subCategoryName) {
        return bookMapper.getBookInfoBySubCategoryName(subCategoryName);
    }
}
